<?php
class AdPositionAction extends AdminAction
{
	public function __construct()
	{
		parent::__construct();
		$this->layout = 'default';
	}
	
	public function execute()
	{
		$adPositionService = new BaseDbService('ad_position');
		
		$template = $this->context->request('template');
		if(empty($template))
		{
			$template = $this->data['template'];
		}
		
		$this->data['adPositions']  = $adPositionService->rows(array('template'=>$template), 'id ASC');
		$this->data['templates'] = AdminUtil::getTemplates();
		$this->data['t'] = $template;
		
		$this->data['menu'] = 'ad';
	}
}
